package com.chushouya.order.dto.api.order;

import com.chushouya.order.constants.UserOrderStatusEnum;
import com.chushouya.order.dto.api.quality.QualityItemApiDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("订单质检信息")
public class OrderQualityApiDTO {

    @ApiModelProperty(value = "速回收订单号")
    private String orderNo;

    @ApiModelProperty(value = "合作方订单号")
    private String partnerOrderNo;

    @ApiModelProperty(value = "产品名")
    private String productName;

    @ApiModelProperty(value = "订单状态")
    private Integer orderStatus;

    @ApiModelProperty(value = "订单状态文案")
    private String orderStatusText;

    @ApiModelProperty(value = "回收方式(1:邮寄，2:上门)")
    private Integer orderType;

    @ApiModelProperty(value = "用户手机号")
    private String userPhone;

    @ApiModelProperty(value = "用户姓名")
    private String userName;

    @ApiModelProperty(value = "成交金额（元）")
    private BigDecimal completePrice;

    @ApiModelProperty(value = "订单金额（元）")
    private BigDecimal orderPrice;

    @ApiModelProperty(value = "质检金额（元）")
    private BigDecimal qualityPrice;

    @ApiModelProperty(value = "估价金额（元）")
    private BigDecimal evaluatePrice;

    @ApiModelProperty(value = "质检时间")
    private Date qualityTime;

    @ApiModelProperty("评估项目")
    private QualityProductApiDTO qualityProduct;

    /**
     * 质检选项
     */
    @ApiModelProperty("订单质检选项")
    private List<QualityItemApiDTO> orderQualityItem;

    /**
     * 质检师信息
     */
    @ApiModelProperty("质检师信息")
    private QualityUserApiDTO qualityUser;



    public String getOrderStatusText() {
        return UserOrderStatusEnum.getDesc(this.orderStatus);
    }

}
